﻿using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

namespace ZGameFramework.UI
{

    public interface IUIResourceManager 
    {
        /// <summary>
        /// 加载图集
        /// </summary>
        /// <param name="spriteName"></param>
        /// <param name="atlasName"></param>
        /// <returns></returns>
        Sprite LoadSprite(string spriteName, string atlasName);

        /// <summary>
        /// 加载字体
        /// </summary>
        /// <param name="assetPath"></param>
        /// <returns></returns>
        TMP_FontAsset LoadTMPFontAsset(string assetPath);

        /// <summary>
        /// 加载纹理
        /// </summary>
        /// <param name="assetPath"></param>
        /// <returns></returns>
        Texture LoadTexture(string assetPath);

        /// <summary>
        /// 加载预制
        /// </summary>
        /// <param name="assetPath"></param>
        /// <returns></returns>
        GameObject LoadPerfab(string assetPath);

        /// <summary>
        /// 归还预制
        /// </summary>
        /// <param name="perfab"></param>
        void ReleasePerfab(GameObject perfab);

        /// <summary>
        /// 卸载预制
        /// </summary>
        /// <param name="perfab"></param>
        void UnLoadPerfab(string assetPath);

        /// <summary>
        /// 卸载所有资源
        /// </summary>
        void UnLoadAll();
    }
}
